<template>
  <div class="toggle" @click="toggle">
    <van-icon name="qr" v-if="is_show" />
    <van-icon name="bars" v-else />
  </div>
</template>

<script>
export default {
  name: "Switchover",
  props: ["is_show"],
  data() {
    return {};
  },

  mounted() {},

  methods: {
    toggle() {
      this.$emit("switch");
    },
  },
};
</script>

<style  scoped>
.toggle {
  position: fixed;
  bottom: 0.8rem;
  right: 0.3rem;
  /* border: 1px solid red; */
  border-radius: 50%;
  width: 0.4rem;
  text-align: center;
  height: 0.4rem;
  background-color: #eee;
}
.van-icon {
  font-size: 0.3rem;
  line-height: 0.4rem;
  color: #aaa;
}
</style>